package com.ds;

import com.ds.common.JDSConstants;
import com.ds.common.JDSException;
import com.ds.common.logging.Log;
import com.ds.common.logging.LogFactory;
import com.ds.esb.util.EsbFactory;
import com.ds.home.engine.HomeServer;
import com.ds.server.JDSServer;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

public class HomeInitServlet extends HttpServlet {
    private static final Log logger = LogFactory.getLog(
            JDSConstants.CONFIG_KEY, HomeInitServlet.class);

    public void init() throws ServletException {

        //  OrgManagerFactory.reLoadSystem();
        try {
            JDSServer.getInstance();
            HomeServer.getInstance();// 启动云平台服务
            EsbFactory.initBus();
        } catch (JDSException e) {
            logger.error("JdsInit Error", e);
        }// 启动主服务


    }

    protected void performTask(HttpServletRequest request,
                               HttpServletResponse response) throws Exception {

    }

}
